﻿Imports System.Runtime.InteropServices

Public Class Form1

    Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As IntPtr
    Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Shell("notepad.exe")
        Dim MyHandle = FindWindow(vbNullString, "Untitled - Notepad")
        SetParent(MyHandle, Me.Handle)
    End Sub
End Class